﻿namespace SKeeper
{
    using SKeeper.Persistence.Facade;
    using System.Data.Entity;
    using System.Web.Mvc;
    using System.Web.Optimization;
    using System.Web.Routing;

    public class MvcApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
           Database.SetInitializer(new MigrateDatabaseToLatestVersion<DomainModelFacade, SKeeper.Persistence.Migrations.Configuration>());
            //Database.SetInitializer(new DropCreateDatabaseAlways<DomainModelFacade>());

            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }
    }
}
